import * as dotenv from 'dotenv';
import * as fs from 'fs';

let envName = process.env.NODE_ENV || 'dev';
if (envName === 'production') envName = 'pro';
const envFilePath = `.${envName}.env`;
if (fs.existsSync(envFilePath)) {
  dotenv.config({ path: envFilePath });
} else {
  dotenv.config();
}
